package com.woody.aggregate.contract.enums;

import lombok.Getter;

/**
 * @author hzy
 * @date 2025/2/24 下午3:25
 */
@Getter
public enum AggreContractState {

    EXPIRE(-1, "过期"),

    UN_SIGN(0, "未签署"),

    SIGNED(2, "已签署"),

    REPLACED_SIGN(3, "待换签"),
    ;

    private Integer type;

    private String value;

    AggreContractState(Integer type, String value) {
        this.type = type;
        this.value = value;
    }

    public static AggreContractState typeOf(Integer type) {
        for (AggreContractState codeEnum : values()) {
            if (codeEnum.type.equals(type) ) {
                return codeEnum;
            }
        }
        return null;
    }
}
